package org.schat.sockets.handlers;

import java.util.Set;

import org.schat.sockets.ChatMessage;
import org.schat.sockets.ChatSocket;

public class LeaveHandler implements IMessageHandler {

	@Override
	public void handle(ChatSocket socket, ChatMessage message) {
		Set<ChatSocket> room = socket.getRoom();
		room.remove(socket);
		socket.send(message);
	}

}
